﻿#ifndef SCREENCAMERAINFO_H
#define SCREENCAMERAINFO_H

#include <QObject>
#include <QScreen>

namespace Qly
{
/**
 * @brief The CameraScreenInfo class 查询屏幕相机的信息的类
 * 用这个类可以查到当前计算机接了几个显示器，给出每个显示器的名称（deviceName）
 */
class CameraScreenInfo
{
    friend class CameraScreen_private;
public:
    explicit CameraScreenInfo(QScreen * screen = nullptr);
    CameraScreenInfo(const CameraScreenInfo &info);
    /**
     * @brief description 没有实现，返回空字符串
     * @return 返回空字符串。
     */
    QString description() const;
    /**
     * @brief deviceName 给出屏幕的名称，比如 "\\\\.\\DISPLAY1", "VGA1" 一类的名称。
     * @return
     */
    QString deviceName() const;
    bool isNull() const;
    bool operator!=(const CameraScreenInfo &other) const;
    CameraScreenInfo &operator=(const CameraScreenInfo &other);
    bool operator==(const CameraScreenInfo &other) const;

    static QList<CameraScreenInfo> availableCameras();
    static CameraScreenInfo defaultCamera();

private:
    QScreen* m_screen;
};
}
#endif // SCREENCAMERAINFO_H
